home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / Rumor Mill / main.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-06  |  1.6 KB  |  61 lines  |  [TEXT/CWIE]

  1. /*
  2. ********************************************************************************
  3. **
  4. ** File: main.h
  5. **
  6. ** Description:
  7. **
  8. **    Header file for Rumor Mill application.
  9. **
  10. ********************************************************************************
  11. **
  12. ** Revision History:
  13. **
  14. ** 12/06/97 Farrier    Created.
  15. **
  16. ********************************************************************************
  17. */
  18. #pragma once
  19.  
  20. #include <LApplication.h>
  21. #include <LListener.h>
  22. #include <UKeyFilters.h>
  23.  
  24. class    CRumorMillApp : public LApplication, public LListener
  25. {
  26.     LEditField    *mIncomingRumor;
  27.     
  28. public:
  29.                         CRumorMillApp();        // constructor registers all PPobs
  30.     virtual             ~CRumorMillApp();        // stub destructor
  31.     
  32.         // this overriding function performs application functions
  33.         
  34.     virtual Boolean        ObeyCommand(CommandT inCommand, void* ioParam);    
  35.     
  36.         // this overriding function returns the status of menu items
  37.         
  38.     virtual void        FindCommandStatus(CommandT inCommand,
  39.                             Boolean &outEnabled, Boolean &outUsesMark,
  40.                             Char16 &outMark, Str255 outName);
  41.     
  42.     virtual void    ListenToMessage(MessageT inMessage, void *ioParam);
  43.     
  44.     Boolean NetStart( void );
  45.     Boolean RegisterName( UInt8 inSocket );
  46.     Boolean UnregisterName( void );
  47.     Boolean NetStop( void );
  48.     Boolean SendRumor( Str255 inRumorText );
  49.     Boolean DisplayRumor( void );
  50.     Boolean FindOtherMills( void );
  51.  
  52.     virtual void        ProcessNextEvent();
  53.     void    SetStatusMessage( Str255 inStatus );
  54.     void    GetStatusMessage( Str255 inStatus );
  55.     
  56.     static EKeyStatus KeyFilterFunction( const EventRecord&    inKeyEvent );
  57.     
  58. protected:
  59.  
  60.     virtual void        StartUp();        // overriding startup functions
  61. };